<!DOCTYPE html>
<html>
<head>
  <title>Popcorn LastFM Plug-in Demo</title>

  <!--
    ATTENTION

    This demo uses an API key obtained for testing the LastFM Popcorn.js
    plugin. Please do not use it for other purposes.
  -->

  <script src="../../popcorn.js"></script>
  <script src="popcorn.lastfm.js"></script>
  <script>
    document.addEventListener( "DOMContentLoaded", function() {
      var p = Popcorn( "#video" )
      .volume( 0 )
      .play()
      .lastfm({
        start: 5,
        end: 15,
        artist: "yacht",
        target: "lastfmdiv",
        apikey: "30ac38340e8be75f9268727cb4526b3d"
      })
      .lastfm({
        start: 10,
        end: 20,
        artist: "the beatles",
        target: "lastfmdiv",
        apikey: "30ac38340e8be75f9268727cb4526b3d"
      })
      .lastfm({
        start: 15,
        end: 30,
        artist: "sdfsdfsdfdsddfsdfsdfsddfsf",
        target: "lastfmdiv",
        apikey: "30ac38340e8be75f9268727cb4526b3d"
      })
	    .lastfm({
        start: 20,
        end: 45,
        artist: "Coldplay",
        target: "lastfmdiv",
        apikey: "30ac38340e8be75f9268727cb4526b3d"
      })
      .lastfm({
        start: 25,
        end: 40,
        artist: "yacht",
        target: "lastfmdiv",
        apikey: "30ac38340e8be75f9268727cb4526b3d"
      })
    }, false);
  </script>
</head>
<body>
  <h1 id="qunit-header">Popcorn LastFM Plug-in Demo</h1>
  <p> Artist information for 'yacht' will appear at 5 seconds and disappear at 15 seconds.</p>
  <p> Artist information for 'The Beatles' will appear at 10 seconds and disappear at 20 seconds.</p>
  <p> 'Unknown Artist' will appear at 15 seconds and disappear at 30 seconds.</p>
  <p> Artist information for 'Coldplay' will appear at 20 seconds and disappear at 45 seconds.</p>
  <p> Artist information for 'yacht' will appear at 25 seconds and disappear at 40 seconds.</p>
  <div>
    <video id="video"
      controls 
      width="250px"
      poster="../../test/poster.png">

      <source id="mp4"
        src="../../test/trailer.mp4"
        type='video/mp4; codecs="avc1, mp4a"'>

      <source id="ogv"
        src="../../test/trailer.ogv"
        type='video/ogg; codecs="theora, vorbis"'>

      <p>Your user agent does not support the HTML5 Video element.</p>

    </video>
  </div>
  <div id="lastfmdiv" width="50%" height="50%">
  </div>
</body>
</html>
